<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CCOJ题目列表</title>
    <style>
        /* 起手式, 100%保证我们的样式设置可以不受默认影响 */
        * {
            margin: 0px;
            padding: 0px;
        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        /* 关键修改：使用flex布局确保footer在底部 */
        body {
            display: flex;
            flex-direction: column;
        }

        .container {
            flex: 1; /* 让容器占据剩余空间，将footer推到底部 */
            display: flex;
            flex-direction: column;
        }

        .container .navbar {
            width: 100%;
            height: 50px;
            background-color: rgb(234, 250, 212);
            display: flex;
        }

        .container .navbar a {
            color: rgb(8, 8, 8);
            font-size: large;
            line-height: 50px;
            text-decoration: none;
            text-align: center;
        }

        .container .navbar a:not(.login) {
            flex: 2;
        }

        .container .navbar .login {
            flex: 1;
        }

        .container .navbar a:hover {
            background-color: green;
        }

        .container .question_list {
            padding-top: 50px;
            width: 800px;
            margin: 0px auto;
            text-align: center;
            /* 让内容区域可扩展，进一步确保footer在底部 */
            flex: 1;
        }

        .container .question_list table {
            width: 100%;
            font-size: large;
            font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
            margin-top: 50px;
            background-color: rgb(243, 248, 246);
        }

        .container .question_list h1 {
            color: green;
        }
        .container .question_list table .item {
            width: 100px;
            height: 40px;
            font-size: large;
            font-family:'Times New Roman', Times, serif;
        }
        .container .question_list table .item a {
            text-decoration: none;
            color: black;
        }
        .container .question_list table .item a:hover {
            color: blue;
            text-decoration:underline;
        }
        .container .footer {
            width: 100%;
            height: 50px;
            background-color: #363535;
            text-align: center;
            line-height: 50px;
            color: #ccc;
            /* 确保footer不被内容覆盖 */
            margin-top: auto;
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 导航栏 -->
        <div class="navbar">
            <a href="/">首页</a>
            <a href="/acq_all_questions">题库</a>
            <a class="login" href="#">登录</a>
        </div>
        <div class="question_list">
            <h1>OnlineJuge题目列表</h1>
            <table>
                <tr>
                    <th class="item">编号</th>
                    <th class="item">标题</th>
                    <th class="item">难度</th>
                </tr>
                {{#question_list}}
                <tr>
                    <td class="item">{{number}}</td>
                    <td class="item"><a href="/acq_question/{{number}}">{{title}}</a></td>
                    <td class="item">{{star}}</td>
                </tr>
                {{/question_list}}
            </table>
        </div>
        <div class="footer">
            <h4>@L-H-X 2025-BUPT-427</h4>
        </div>
    </div>

</body>

</html>
    

